#include<stdio.h>

struct emp{
	char name[20];
	int sal;
};

int main(){
	struct emp e = {"Shivam", 10000};
	char *mode = "wb";
	FILE *fp;
	char* filename = "data.txt";

	fp = fopen(filename, "wb");
	if(fp == NULL)
		printf("Error in opening file");
	fwrite(&e, 1, sizeof(e), fp);
	fclose(fp);
	return 0;
}
